#include "Model3DTerrain.h"
#include "ModelUtil.h"

namespace steam
{
	namespace moon
	{
		Model3DTerrain::Model3DTerrain(coal::IMesh* mesh, const base::Scale& scaleFactor)
		{
			m_scale = scaleFactor;
			m_mesh = coal::ModelUtil::duplicateMesh(mesh, scaleFactor);
			m_X = 100;
			m_Z = 100; // Calculate real values
		}

		Model3DTerrain::~Model3DTerrain()
		{
			delete m_mesh;
		}

		coal::IMesh* steam::moon::Model3DTerrain::getMesh()
		{
			return m_mesh;
		}

		float steam::moon::Model3DTerrain::getHeightAt( int x, int z ) const
		{
			return 0;
		}

		float steam::moon::Model3DTerrain::getWidth() const
		{
			return m_X;
		}

		float steam::moon::Model3DTerrain::getLength() const
		{
			return m_Z;
		}

		const base::Scale& steam::moon::Model3DTerrain::getScaleFactor() const
		{
			return m_scale;
		}

	}
}





